package com.jie.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jie.dto.UserBackDTO;
import com.jie.entity.UserInfo;
import com.jie.vo.ConditionVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zwq
 * @since 2022-01-04
 */
@Mapper
public interface UserInfoMapper extends BaseMapper<UserInfo> {

    /**
     * 插入账户并返回id
     */
    Integer insertUserInfo(UserInfo userInfo);

    //获取用户数量
    Integer countUser(@Param("condition") ConditionVO condition);

    /**
     * 分页查询
     *
     * @param condition
     * @return
     */
    List<UserBackDTO> listUsers(@Param("condition") ConditionVO condition);
}
